<script setup>

import {useSocketStore} from "@/stores/socket.js";
import {userInfoStore} from "@/stores/user.js";

const socketStore = useSocketStore()
const user = userInfoStore()
if (user.userInfo.userId) {
  socketStore.initialize(user.userInfo.userId)
  socketStore.initializeGroupSocket(user.userInfo.userId)
}

</script>

<template>
  <!-- 一级路由出口组件 -->
  <router-view />

</template>

<style scoped lang="scss"></style>
